import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './style.css'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import { useThemeStore } from './store/modules/theme'

const app = createApp(App)
const pinia = createPinia()

// 先使用pinia
app.use(pinia)

// 初始化主题
const themeStore = useThemeStore()
themeStore.loadTheme()

// 然后使用其他插件
app.use(router)
app.use(ElementPlus)

app.mount('#app')
